<h1>发表评论</h1>

<% form_for(@post.comments.new) do |form| %>
  <%= form.hidden_field :post_id, :value => @post.id %>
  <%= render :partial => "comments/form",:object => form %>
  <p>
    <%= form.submit '提交' %>
  </p>
<% end %>